Grade – 10 – Computer Science – Web Development: Full-Stack Applications – Multiple Choice Questions

Multiple Choice Questions

Web Development: Full-Stack Applications

Topic: HTML

Grade: 10

Question 1:
Which of the following is NOT a valid HTML tag?
a)

b)

c)

d)

Answer: d)

Explanation: The tag is not a valid HTML tag. HTML tags are used to define the structure and content of a web page. The

,

, and

tags are all valid HTML tags that are commonly used to structure the content on a web page.

Example:
Simple:

is a block-level element used to group other elements together.
Complex:

is used to define a header section of a document or a section within the document.

Question 2:
Which of the following HTML tags is used to create a hyperlink?
a)
b)
c)

d)

Answer: b)

Explanation: The tag is used to create a hyperlink in HTML. It is an anchor tag that allows you to link to another webpage or a specific section within the same webpage. The tag is used to insert an image, the

tag is used to define a heading, and the

tag is used to define a paragraph.

Example:
Simple:
Link creates a hyperlink to the website \”https://example.com\”.
Complex: Go to Section 2 creates a hyperlink that navigates to the section with the id \”section2\” on the same page.

Question 3:
Which attribute is used to provide alternative text for an image in HTML?
a) alt
b) src
c) href
d) title

Answer: a) alt

Explanation: The \”alt\” attribute is used to provide alternative text for an image in HTML. This text is displayed if the image fails to load or if it is read by screen readers for visually impaired users. The \”src\” attribute is used to specify the source (URL) of the image, the \”href\” attribute is used in anchor tags to specify the target of the link, and the \”title\” attribute provides additional information about the element.

Example:
Simple: \"A displays the image \”image.jpg\” with the alternative text \”A beautiful sunset\”.
Complex: \"A displays the image with the alternative text \”A beautiful sunset\” and a title attribute that provides additional information.

Question 4:
Which of the following is the correct way to add a comment in HTML?
a)
b) // This is a comment
c) ** This is a comment **
d) /* This is a comment */

Answer: a)

Explanation: Comments in HTML are added using the syntax. Everything between these tags is ignored by the browser and is not displayed on the webpage. Comments are used to add notes or explanations to the code for developers to understand it better. The other options are incorrect syntax for adding comments in HTML.

Example:
Simple: adds a comment that is not displayed on the webpage.
Complex: provides a comment that helps other developers understand the code better.

Question 5:
Which HTML tag is used to display a line break without starting a new paragraph?
a)
b)

c)


d)

Answer: a)

Explanation: The
tag is used to insert a line break in HTML without starting a new paragraph. It is a self-closing tag and does not require a closing tag. The

tag is used to define a paragraph, the


tag is used to insert a horizontal rule, and the

tag is used to group elements together.

Example:
Simple: This is
a line break. displays \”This is\” followed by a line break and then \”a line break\” on a new line.
Complex:

This is a paragraph.
This is another line.

displays \”This is a paragraph.\” followed by a line break and then \”This is another line.\” within the same paragraph.

Leave a Comment

Your email address will not be published. Required fields are marked *

Shopping Cart
error: Content cannot be copied. it is protected !!
Scroll to Top